/**
 * 
 */
package com.hexacta.hrs.repositories.employee;

import java.util.Calendar;
import java.util.Collection;
import java.util.Date;
import java.util.List;

import org.vectrics.employee.Employee;
import org.vectrics.employee.MedicalInsurance;
import org.vectrics.user.User;

import com.hexacta.hrs.domain.staffing.Project;
import com.hexacta.hrs.domain.staffing.assignment.EmployeeAssignment;
import com.hexacta.hrs.repositories.RecordObjectRepository;

/**
 * @author pgoette
 * 
 */
public interface EmployeeRepository extends RecordObjectRepository<Employee> {

    Employee searchBy(User user);

    public Collection<Employee> getActiveEmployees();

    public Collection<Employee> getEvaluators(Employee employee, String period, Project project, int wight);

    public Collection<EmployeeAssignment> getEvaluables(Employee evaluator, String period, Project project);

    public Collection<Employee> getActiveEmployeesWithAntiquity();

    Employee getEmployeeByPersonId(Long personId);

    public Collection<Employee> getAssignableEmployees();

    List<MedicalInsurance> getEmployeesMedicalInsurance();

    /**
     * @param from
     * @param to
     * @return empleados activos en el per�odo
     */
    Collection<Employee> getActiveEmployees(Date from, Date to);

    /**
     * @param from
     * @param to
     * @return empleadosactivos y asignables en el per�odo
     */
    Collection<Employee> getAssignableEmployees(Date from, Date to);

    /**
     * @param from
     * @param to
     * @return empleadosactivos y asignables en el per�odo con los roles
     *         indicados
     */
    Collection<Employee> getAssignableEmployees(Date from, Date to, String[] roles);

    /**
     * @param from
     * @param to
     * @param roles
     * @return
     */
    Collection<Employee> getActiveEmployees(Date from, Date to, String[] roles);

    // Metodos de reportes
    List<Object> getEmployeesByOffice();

    List<Object> getEmployeesByGender();

    List<Object> getEmployeesWithChildren();

    List<Object> getEmployeesByJourney();

    List<Object> getEmployeesByDegree();

    List<Object> getEmployeesBySeniorityAndArea();

    List<Object> getEmployeesBySeniorityAndGender();

    List<Object> getEmployeesByLanguage();

    List<Object> getEmployeesByEnglishLevel();

    List<Object> getEmployeesByAntiquity();

    List<Object> getEmployeesByAge();

    List<Object> getEmployeesFlow(Calendar begin, Calendar end);

    List<Object> getEmployeesMarried();

    /**
     * @param begin
     * @param end
     * @return
     */
    String getEnteringEmployees(Calendar begin, Calendar end);

    /**
     * @param begin
     * @param end
     * @return
     */
    String getExitingEmployees(Calendar begin, Calendar end);

	List<Employee> getPartners();

}
